# $Id: Makefile 35 2009-10-20 22:32:23Z Niki.Zadeh $
#
# Should we add a make help  target? -AJA

 NE2SW = ne2sw.py
 F90   = ifort

include make.inc

%.o: %.F90
	$(F90) $(CPPFLAGS) $(FFLAGS) $(F90KMACROSFLAG) -c $<

libHOMEkernels.a: HOME_kernels_cne.o HOME_kernels_csw.o
	$(ARCH) $(ARCHFLAGS) libHOME_kernels.a $?

HOME_kernels_csw.F90: HOME_kernels_cne.F90
	$(NE2SW) $<  > $@

clean:
	-rm -f *.o *.mod
Clean:
	@make clean
	-rm -f *sw.F90

test: test_kernels/test_any_kernel
	cd test_kernels; ./test_any_kernel

test_kernels/test_any_kernel: test_kernels/test_any_kernel.F90 libHOMEkernels.a
	cd test_kernels; ifort -g -r8 -i4 test_any_kernel.F90 ../libHOME_kernels.a -I../ -o test_any_kernel
